package com.springboot.astra.service.serviceImpl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.springboot.astra.bean.Tag;
import com.springboot.astra.mapper.TagMapper;
import com.springboot.astra.service.TagService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class TagServiceImpl implements TagService {

    @Autowired
    TagMapper tagMapper;

    @Override
    public Tag getOneById(Integer id) {
        return tagMapper.getOneById(id);
    }

    @Override
    public List<Tag> getAll() {
        return tagMapper.getAll();
    }

    @Override
    public void insertTag(Tag tag) {
        tagMapper.insertTag(tag);
    }

    @Override
    public void updateOneById(Tag tag) {
        tagMapper.updateOneById(tag);
    }

    @Override
    public Void deleteOneById(Tag tag) {
        return tagMapper.deleteOneById(tag);
    }

    @Override
    public IPage<Tag> selectPageVo(Page<Tag> page, String query) {
        return tagMapper.selectPageVo(page,query);
    }
}
